{smcl}
{com}{sf}{ul off}{txt}{.-}
      name:  {res}<unnamed>
       {txt}log:  {res}C:\Users\jp18390\Dropbox\DISCRIMINATION PROJECT (U.S. FEDERAL AGENCIES)\Age Discrimination Project\Organizational Justice_Factor Scores 2010-2019\FEVS_2014.smcl
  {txt}log type:  {res}smcl
 {txt}opened on:  {res}17 Jun 2021, 23:09:07

{com}. import delimited "C:\Users\jp18390\Dropbox\DISCRIMINATION PROJECT (U.S. FEDERAL AGENCIES)\FEVS\FEVS_2010-2019\FEVS2014_PRDF.csv"
{res}{text}(100 vars, 392,752 obs)

{com}. svyset [pweight=postwt]

      {txt}pweight:{col 16}{res}postwt
          {txt}VCE:{col 16}{res}linearized
  {txt}Single unit:{col 16}{res}missing
     {txt}Strata 1:{col 16}<one>
         SU 1:{col 16}<observations>
        FPC 1:{col 16}<zero>
{p2colreset}{...}

{com}. 
. 
. 
. 
. 
. drop if q17=="X"
{txt}(16,950 observations deleted)

{com}. 
. drop if q17==""
{txt}(2,708 observations deleted)

{com}. 
. drop if q37=="X"
{txt}(17,214 observations deleted)

{com}. 
. drop if q37==""
{txt}(8,948 observations deleted)

{com}. 
. drop if q38=="X"
{txt}(16,630 observations deleted)

{com}. 
. drop if q38==""
{txt}(3,530 observations deleted)

{com}. 
. drop if q15=="X"
{txt}(2,511 observations deleted)

{com}. 
. drop if q15==""
{txt}(1,200 observations deleted)

{com}. 
. drop if q22=="X"
{txt}(12,769 observations deleted)

{com}. 
. drop if q22==""
{txt}(2,626 observations deleted)

{com}. 
. drop if q25=="X"
{txt}(7,379 observations deleted)

{com}. 
. drop if q25==""
{txt}(1,579 observations deleted)

{com}. 
. drop if q33=="X"
{txt}(5,929 observations deleted)

{com}. 
. drop if q33==""
{txt}(2,765 observations deleted)

{com}. 
. drop if q48==.
{txt}(2,735 observations deleted)

{com}. 
. drop if q49==.
{txt}(1,123 observations deleted)

{com}. 
. 
. 
. destring q17, replace
{txt}q17: all characters numeric; {res}replaced {txt}as {res}byte

{com}. 
. destring q37, replace
{txt}q37: all characters numeric; {res}replaced {txt}as {res}byte

{com}. 
. destring q38, replace
{txt}q38: all characters numeric; {res}replaced {txt}as {res}byte

{com}. 
. destring q15, replace
{txt}q15: all characters numeric; {res}replaced {txt}as {res}byte

{com}. 
. destring q22, replace
{txt}q22: all characters numeric; {res}replaced {txt}as {res}byte

{com}. 
. destring q25, replace
{txt}q25: all characters numeric; {res}replaced {txt}as {res}byte

{com}. 
. destring q33, replace
{txt}q33: all characters numeric; {res}replaced {txt}as {res}byte

{com}. 
. 
. 
. svy linearized : sem (JUSTICE -> DISTRIBUTIVE, ) (JUSTICE -> PROCEDURAL, ) (JUSTICE -> INTERPERSONAL, ) (DISTRIBUTIVE -> q22, ) (DISTRIBUTIVE -> q25, ) (DISTRIBUTIVE -> q33, ) (PROCEDURAL -> q15, ) (PROCEDURAL -> q17, ) (PROCEDURAL -> q37, ) (PROCEDURAL -> q38, )(INTERPERSONAL -> q48, ) (INTERPERSONAL -> q49, ), standardized latent(JUSTICE DISTRIBUTIVE PROCEDURAL INTERPERSONAL ) nocapslatent
{txt}(running sem on estimation sample)
{res}
{txt}{col 1}Survey: Structural equation model{col 49}Number of obs{col 67}= {res}   286,156
{txt}{col 1}Number of strata{col 22}= {res}        1{txt}{col 49}Population size{col 67}={res}  1,295,218
{txt}{col 1}Number of PSUs{col 22}= {res}  286,156{txt}{col 49}Design df{col 67}= {res}   286,155

{p 0 7}{space 1}{text:( 1)}{space 1} [q22]DISTRIBUTIVE = 1{p_end}
{p 0 7}{space 1}{text:( 2)}{space 1} [q15]PROCEDURAL = 1{p_end}
{p 0 7}{space 1}{text:( 3)}{space 1} [q48]INTERPERSONAL = 1{p_end}
{p 0 7}{space 1}{text:( 4)}{space 1} [DISTRIBUTIVE]JUSTICE = 1{p_end}
{txt}{hline 20}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 21}{c |}{col 33}  Linearized
{col 1}       Standardized{col 21}{c |}      Coef.{col 33}   Std. Err.{col 45}      t{col 53}   P>|t|{col 61}     [95% Con{col 74}f. Interval]
{hline 20}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 1}{res}Structural         {col 21}{txt}{c |}
{space 2}{col 3}DISTRIBUTIVE     {col 21}{c |}
{space 12}JUSTICE {c |}{col 21}{res}{space 2} .8408898{col 33}{space 2} .0018002{col 44}{space 1}  467.12{col 53}{space 3}0.000{col 61}{space 4} .8373615{col 74}{space 3} .8444181
{space 2}{txt}{hline 18}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 2}{col 3}PROCEDURAL       {col 21}{c |}
{space 12}JUSTICE {c |}{col 21}{res}{space 2} .9789162{col 33}{space 2} .0019184{col 44}{space 1}  510.28{col 53}{space 3}0.000{col 61}{space 4} .9751561{col 74}{space 3} .9826762
{space 2}{txt}{hline 18}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 2}{col 3}INTERPERSONAL    {col 21}{c |}
{space 12}JUSTICE {c |}{col 21}{res}{space 2} .6918439{col 33}{space 2} .0020808{col 44}{space 1}  332.48{col 53}{space 3}0.000{col 61}{space 4} .6877655{col 74}{space 3} .6959223
{txt}{hline 20}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 1}{res}Measurement        {col 21}{txt}{c |}
{space 2}{col 3}q22              {col 21}{c |}
{space 7}DISTRIBUTIVE {c |}{col 21}{res}{space 2} .8412836{col 33}{space 2} .0013132{col 44}{space 1}  640.64{col 53}{space 3}0.000{col 61}{space 4} .8387098{col 74}{space 3} .8438574
{txt}{space 14}_cons {c |}{col 21}{res}{space 2} 2.317999{col 33}{space 2}  .004294{col 44}{space 1}  539.82{col 53}{space 3}0.000{col 61}{space 4} 2.309582{col 74}{space 3} 2.326415
{space 2}{txt}{hline 18}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 2}{col 3}q25              {col 21}{c |}
{space 7}DISTRIBUTIVE {c |}{col 21}{res}{space 2} .8338818{col 33}{space 2}  .001343{col 44}{space 1}  620.91{col 53}{space 3}0.000{col 61}{space 4} .8312495{col 74}{space 3}  .836514
{txt}{space 14}_cons {c |}{col 21}{res}{space 2} 2.382961{col 33}{space 2} .0045726{col 44}{space 1}  521.14{col 53}{space 3}0.000{col 61}{space 4} 2.373999{col 74}{space 3} 2.391923
{space 2}{txt}{hline 18}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 2}{col 3}q33              {col 21}{c |}
{space 7}DISTRIBUTIVE {c |}{col 21}{res}{space 2} .7087392{col 33}{space 2} .0017812{col 44}{space 1}  397.90{col 53}{space 3}0.000{col 61}{space 4}  .705248{col 74}{space 3} .7122303
{txt}{space 14}_cons {c |}{col 21}{res}{space 2} 2.123202{col 33}{space 2} .0034705{col 44}{space 1}  611.79{col 53}{space 3}0.000{col 61}{space 4}   2.1164{col 74}{space 3} 2.130004
{space 2}{txt}{hline 18}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 2}{col 3}q15              {col 21}{c |}
{space 9}PROCEDURAL {c |}{col 21}{res}{space 2}  .607831{col 33}{space 2}   .00246{col 44}{space 1}  247.08{col 53}{space 3}0.000{col 61}{space 4} .6030094{col 74}{space 3} .6126526
{txt}{space 14}_cons {c |}{col 21}{res}{space 2} 3.156972{col 33}{space 2} .0081047{col 44}{space 1}  389.52{col 53}{space 3}0.000{col 61}{space 4} 3.141087{col 74}{space 3} 3.172857
{space 2}{txt}{hline 18}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 2}{col 3}q17              {col 21}{c |}
{space 9}PROCEDURAL {c |}{col 21}{res}{space 2} .7531559{col 33}{space 2} .0017257{col 44}{space 1}  436.44{col 53}{space 3}0.000{col 61}{space 4} .7497737{col 74}{space 3} .7565382
{txt}{space 14}_cons {c |}{col 21}{res}{space 2}  2.84702{col 33}{space 2} .0066868{col 44}{space 1}  425.77{col 53}{space 3}0.000{col 61}{space 4} 2.833914{col 74}{space 3} 2.860126
{space 2}{txt}{hline 18}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 2}{col 3}q37              {col 21}{c |}
{space 9}PROCEDURAL {c |}{col 21}{res}{space 2} .8303562{col 33}{space 2} .0014905{col 44}{space 1}  557.09{col 53}{space 3}0.000{col 61}{space 4} .8274348{col 74}{space 3} .8332776
{txt}{space 14}_cons {c |}{col 21}{res}{space 2} 2.629508{col 33}{space 2} .0057329{col 44}{space 1}  458.67{col 53}{space 3}0.000{col 61}{space 4} 2.618271{col 74}{space 3} 2.640744
{space 2}{txt}{hline 18}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 2}{col 3}q38              {col 21}{c |}
{space 9}PROCEDURAL {c |}{col 21}{res}{space 2}  .808623{col 33}{space 2} .0016144{col 44}{space 1}  500.88{col 53}{space 3}0.000{col 61}{space 4} .8054588{col 74}{space 3} .8117872
{txt}{space 14}_cons {c |}{col 21}{res}{space 2} 3.203825{col 33}{space 2} .0082846{col 44}{space 1}  386.72{col 53}{space 3}0.000{col 61}{space 4} 3.187588{col 74}{space 3} 3.220063
{space 2}{txt}{hline 18}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 2}{col 3}q48              {col 21}{c |}
{space 6}INTERPERSONAL {c |}{col 21}{res}{space 2} .9377777{col 33}{space 2}  .001139{col 44}{space 1}  823.30{col 53}{space 3}0.000{col 61}{space 4} .9355452{col 74}{space 3} .9400102
{txt}{space 14}_cons {c |}{col 21}{res}{space 2} 3.663022{col 33}{space 2}  .010078{col 44}{space 1}  363.47{col 53}{space 3}0.000{col 61}{space 4} 3.643269{col 74}{space 3} 3.682774
{space 2}{txt}{hline 18}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 2}{col 3}q49              {col 21}{c |}
{space 6}INTERPERSONAL {c |}{col 21}{res}{space 2} .9147463{col 33}{space 2} .0012068{col 44}{space 1}  758.01{col 53}{space 3}0.000{col 61}{space 4} .9123811{col 74}{space 3} .9171116
{txt}{space 14}_cons {c |}{col 21}{res}{space 2} 3.962449{col 33}{space 2} .0119273{col 44}{space 1}  332.22{col 53}{space 3}0.000{col 61}{space 4} 3.939072{col 74}{space 3} 3.985826
{txt}{hline 20}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 10}var(e.q22){c |}{col 21}{res}{space 2} .2922419{col 33}{space 2} .0022095{col 61}{space 4} .2879432{col 74}{space 3} .2966048
{txt}{space 10}var(e.q25){c |}{col 21}{res}{space 2} .3046412{col 33}{space 2} .0022398{col 61}{space 4} .3002827{col 74}{space 3} .3090629
{txt}{space 10}var(e.q33){c |}{col 21}{res}{space 2} .4976888{col 33}{space 2} .0025248{col 61}{space 4} .4927647{col 74}{space 3} .5026621
{txt}{space 10}var(e.q15){c |}{col 21}{res}{space 2} .6305415{col 33}{space 2} .0029906{col 61}{space 4} .6247073{col 74}{space 3} .6364303
{txt}{space 10}var(e.q17){c |}{col 21}{res}{space 2} .4327561{col 33}{space 2} .0025994{col 61}{space 4} .4276913{col 74}{space 3}  .437881
{txt}{space 10}var(e.q37){c |}{col 21}{res}{space 2} .3105086{col 33}{space 2} .0024753{col 61}{space 4} .3056948{col 74}{space 3} .3153983
{txt}{space 10}var(e.q38){c |}{col 21}{res}{space 2} .3461288{col 33}{space 2} .0026109{col 61}{space 4} .3410492{col 74}{space 3} .3512841
{txt}{space 10}var(e.q48){c |}{col 21}{res}{space 2}  .120573{col 33}{space 2} .0021363{col 61}{space 4} .1164577{col 74}{space 3} .1248338
{txt}{space 10}var(e.q49){c |}{col 21}{res}{space 2} .1632391{col 33}{space 2} .0022078{col 61}{space 4} .1589688{col 74}{space 3} .1676242
{txt}{space 1}var(e.DISTRIBUTIVE){c |}{col 21}{res}{space 2} .2929044{col 33}{space 2} .0030275{col 61}{space 4} .2870303{col 74}{space 3} .2988987
{txt}{space 3}var(e.PROCEDURAL){c |}{col 21}{res}{space 2} .0417231{col 33}{space 2} .0037559{col 61}{space 4} .0349745{col 74}{space 3}  .049774
{txt}var(e.INTERPERSONAL){c |}{col 21}{res}{space 2}  .521352{col 33}{space 2} .0028792{col 61}{space 4} .5157392{col 74}{space 3} .5270259
{txt}{space 8}var(JUSTICE){c |}{col 21}{res}{space 2}        1{col 33}{space 2}        .{col 61}{space 4}        .{col 74}{space 3}        .
{txt}{hline 20}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}

{com}. 
. 
. 
. estat gof, stats(all)
{res}
{txt}{hline 21}{c TT}{hline 54}
{lalign 21:Fit statistic}{c |}      Value   Description
{hline 21}{c +}{hline 54}
{lalign 21:Size of residuals}{c |}
{ralign 20:SRMR} {c |} {res}{ralign 10:     0.041}{txt}   Standardized root mean squared residual
{ralign 20:CD} {c |} {res}{ralign 10:     0.963}{txt}   Coefficient of determination
{hline 21}{c BT}{hline 54}
{p 0 2 2 75}Note: model was fit with{txt} svy: prefix; only stats(residuals) valid.{p_end}

{com}. predict justice, latent(JUSTICE)
{res}
{com}. 
. 
. 
. egen average_justice = mean (justice), by (agency)

. 
. 
. 
. egen sub1_average_justice = mean (justice), by (plevel1)

. 
. 
. 
. egen sub2_average_justice = mean (justice), by (plevel2)

. save "C:\Users\jp18390\Dropbox\DISCRIMINATION PROJECT (U.S. FEDERAL AGENCIES)\Age Discrimination Project\Organizational Justice_Factor Scores 2010-2019\2014FEVS_Justice.dta"
{txt}file C:\Users\jp18390\Dropbox\DISCRIMINATION PROJECT (U.S. FEDERAL AGENCIES)\Age Discrimination Project\Organizational Justice_Factor Scores 2010-2019\2014FEVS_Justice.dta saved

{com}. exit, clear
